﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Markup;

namespace UIT.Controls.Containers
{
    [ContentProperty("Child")]
    public class ScrollViewer : Control, IContainer
    {
        public IControl Child
        {
            get { return children.Child; }
            set { children.Add(value); }
        }


        private SingleItemDisposableObservableCollection<IContainer, IControl> children;
        public ScrollViewer()
        {
            children = new SingleItemDisposableObservableCollection<IContainer, IControl>(this);
        }

        public override bool IsContainer
        {
            get { return true; }
        }

        public override ControlType Type
        {
            get { return ControlType.ScrollViewer; }
        }

        public IDisposableObservableCollection<IContainer, IControl> Children
        {
            get { return children; }
        }
    }
}
